﻿using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;


namespace Platformer1
{
    class NinjaEnemy : CustomEnemy
    {
        public NinjaEnemy(Level level, Vector2 in_position)
            : base()
        {
            this.Level = level;

            LoadEnemy();

            Position = in_position;
            Reset(Position);
        }
        new public void LoadEnemy()
        {
            idleAnimation = new Animation(Level.Content.Load<Texture2D>("Sprites/MonsterA/idle"), 0.1f, true);
            runAnimation = new Animation(Level.Content.Load<Texture2D>("Sprites/MonsterA/Run"), 0.1f, true);
            jumpAnimation = new Animation(Level.Content.Load<Texture2D>("Sprites/MonsterA/idle"), 0.1f, false);
            dieAnimation = new Animation(Level.Content.Load<Texture2D>("Sprites/MonsterA/Die"), 0.1f, false);
            jumpPunchAnimation = new Animation(Level.Content.Load<Texture2D>("Sprites/MonsterA/Punch"), 0.1f, true, Level.Content.Load<Texture2D>("Sprites/MonsterA/Punch_hit"), 1);
            punchAnimation = new Animation(Level.Content.Load<Texture2D>("Sprites/MonsterA/Punch"), 0.1f, true, Level.Content.Load<Texture2D>("Sprites/MonsterA/Punch_hit"), 1);
            jumpKickAnimation = new Animation(Level.Content.Load<Texture2D>("Sprites/MonsterA/Punch"), 0.1f, true, Level.Content.Load<Texture2D>("Sprites/MonsterA/Punch_hit"), 1);
            hudFont = Level.Content.Load<SpriteFont>("Fonts/Hud");
            debug = Level.Content.Load<Texture2D>("debug");
            int width = (int)(idleAnimation.FrameWidth * 0.4);
            int left = (idleAnimation.FrameWidth - width) / 2;
            int height = (int)(idleAnimation.FrameWidth * 0.8);
            int top = idleAnimation.FrameHeight - height;
            localBounds = new Rectangle(left, top, width, height);

            LoadSoundEffects();

            MoveAcceleration = 7000.0f;
            MaxMoveSpeed = 1000.0f;

            ai_style = 1;

        }

    }
}
